﻿#ifndef IMEMBUFREADER_H
#define IMEMBUFREADER_H


#include <iostream>

#ifdef _WINDOWS
#ifdef IMEMBUFREADER_DLL_EXPORT
#define  IMEMBUFREADER_DLL __declspec(dllexport)
#else
#define  IMEMBUFREADER_DLL __declspec(dllimport)
#endif
#define OSGI_API __cdecl

#else
#include <sys/types.h>
#define  IMEMBUFREADER_DLL __attribute__((visibility("default")))
#define __int64 int64_t
#ifndef OSGI_API
#define OSGI_API __attribute__((__cdecl__))
#endif
#define _cdecl __attribute__((__cdecl__))
#define __cdecl __attribute__((__cdecl__))
#endif

#define OSGI_INTERFACE struct

#define NULL				0

namespace MicroKernelRuntime{

OSGI_INTERFACE IMemBufReader //
{
        virtual const void* OSGI_API GetBuf() = 0;
        virtual int OSGI_API GetLength() = 0;
        virtual void OSGI_API Destroy() = 0;
};

}

extern "C"
{

IMEMBUFREADER_DLL void* CreateMemBuf(void* pBuf, int len, bool bCopy);

}

#endif
